推荐11个有用的Python库 |
您所在的位置:网站首页 › python 推荐库 › 推荐11个有用的Python库 |
1) delorean 非常酷的日期 / 时间库 2) prettytable 可以在浏览器或终端构建很不错的输出 3) snowballstemmer 非常瘦小的语言转换库,支持 15 种语言 from delorean import Delorean EST = "US/Eastern" d = Delorean(timezone=EST) 2 ) prettytable from prettytable import PrettyTable table = PrettyTable([ "animal" , "ferocity" ]) table.add_row([ "wolverine" , 100 ]) table.add_row([ "grizzly" , 87 ]) table.add_row([ "Rabbit of Caerbannog" , 110 ]) table.add_row([ "cat" , ‐ 1 ]) table.add_row([ "platypus" , 23 ]) table.add_row([ "dolphin" , 63 ]) table.add_row([ "albatross" , 44 ]) table.sort_key( "ferocity" ) table.reversesort = True +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐+ | animal | ferocity | +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐+ | Rabbit of Caerbannog | 110 | | wolverine | 100 | | grizzly | 87 | | dolphin | 63 | | albatross | 44 | | platypus | 23 | | cat | ‐ 1 | +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐+ |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |